﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {/*

            //io选择D盘
            DriveInfo driveinfo = new DriveInfo("D");
            Console.WriteLine("驱动器名称" + driveinfo.Name);
            Console.WriteLine("驱动器的剩余空间" + driveinfo.AvailableFreeSpace);
            Console.WriteLine("驱动器目录" + driveinfo.RootDirectory);
            Console.WriteLine("驱动器标卷" + driveinfo.VolumeLabel);
            //所有逻辑驱动器名字
            Console.WriteLine();
            Console.WriteLine("所有逻辑驱动器名字");
            DriveInfo[] driveInfos = DriveInfo.GetDrives();
            foreach (DriveInfo d in driveInfos)
            {
                if (d.IsReady) {
                    Console.WriteLine("驱动器名字"+d.Name);
                    Console.WriteLine("驱动器文件格式" + d.DriveFormat);
                }
            }*/
           /* DirectoryInfo directoryInfo2 = new DirectoryInfo("D:\\");
            IEnumerable <DirectoryInfo> dir = directoryInfo2.EnumerateDirectories();
            foreach (var v in dir) {

                if (v.Name == "mySolo")
                {
                    Console.WriteLine("已经有一个mySolo");
                }
                else {
                    Console.WriteLine("没有mySolo");
                }
            }
          directoryInfo2.Create();
            directoryInfo2.CreateSubdirectory("mySolo");
            DirectoryInfo directoryInfo3 = new DirectoryInfo("D:\\mySolo");
           
            directoryInfo3.CreateSubdirectory("我爱你我的国家.text");*/
            string path = @"D:\mySolo\我爱你我的国家.txt";
            StreamWriter streamWriter = new StreamWriter(path);
            streamWriter.WriteLine("我是一个不知道路在哪的人");
            streamWriter.Flush();
            streamWriter.Close();
        }
        

    }  
}
